package com.ucpaas.paas.web;

import com.ucpaas.paas.web.config.ApplicationConfig;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;


/**
 * @author taoj
 */
@EnableWebMvc
@EnableAutoConfiguration
@EnableScheduling
@EnableTransactionManagement
//@SpringBootApplication
@SpringBootApplication
//@EnableDiscoveryClient
//@EnableFeignClients(basePackages = "com.ucpaas.paas")
//@Import({ApplicationConfig.class,DmpRedisConfig.class,RibbonAutoConfiguration.class, FeignRibbonClientAutoConfiguration.class, FeignAutoConfiguration.class})
@Import({ApplicationConfig.class})
public class PaasApplication implements CommandLineRunner {

    public static void main(String[] args) {
        System.exit(SpringApplication
                .exit(SpringApplication.run(PaasApplication.class, args)));
    }

    @Override
    public void run(String... args) throws Exception {
        synchronized (this) {
            while (true) {
                this.wait();
            }
        }
    }
}
